import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-03-23
 * Time: 16:03
 */

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int ans = 0;
        int start = 0;
        int n = str.length();
        for (int i = 0; i < n; i++) {
            int count = 0;
            while (i < n && Character.isDigit(str.charAt(i))) {
                count++;
                i++;
            }
            if (count > ans) {
                start = i - count;
                ans = count;
            }
        }
        System.out.println(str.substring(start, start + ans));
    }
}
